
package top.continew.admin.generator.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 待办事项创建/修改请求信息
 *
 * @author kellen
 * @since 2025/07/30
 */
@Data
@Schema(description = "待办事项创建/修改请求信息")
public class TaskTodoUploadReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 负责人
     */
    @Schema(description = "负责人", example = "1")
    @NotNull(message = "负责人不能为空")
    private Long directorId;

    /**
     * 事项类型：0-待办
     */
    @Schema(description = "事项类型", example = "0")
    private Integer taskType = 0;

    /**
     * 任务内容
     */
    @Schema(description = "任务内容", example = "请处理XXX事项")
    @NotBlank(message = "任务内容不能为空")
    private String taskContent;

    /**
     * 任务状态：0-待查看，1-已查看，2-已处理，3-已关闭
     */
    @Schema(description = "任务状态", example = "0")
    private Integer taskStatus = 0;

    /**
     * 附件列表
     */
    @Schema(description = "附件列表")
    private List<AttachmentInfo> attachments;

    @Data
    @Schema(description = "附件信息")
    public static class AttachmentInfo {
        @Schema(description = "文件名", example = "document.pdf")
        private String fileName;
        
        @Schema(description = "文件链接", example = "http://example.com/file.pdf")
        private String fileUrl;
    }
}